import 'package:myapp/entities/entities.dart';

class Profile {
  // bool following;
  String image;
  String bio;
  List<String> following;
  List<String> followers;

  Profile({
    required this.following,
    required this.image,
    required this.bio,
    required this.followers
  });

  static final empty = Profile(
    following: List.empty(),
    image: 'https://pic.imgdb.cn/item/673ef538d29ded1a8cddd2ee.jpg',
    bio: '',
    followers: []
	);

  ProfileEntity toEntity() {
    return ProfileEntity(
      following: following,
      image: image,
      bio: bio,
      followers: followers
    );
  }

  static Profile fromEntity(ProfileEntity entity) {
    return Profile(
      following: entity.following,
      image: entity.image,
      bio: entity.bio,
      followers: entity.followers
    );
  }

  @override
  String toString() {
    return 'Profile:  $following, $image, $bio';
  }
}